{// 引入标签库 }
<tagLib name="fanwe" />
{// 加载头部公共文件 }
<include file="Public:header" />
<load href="__TMPL__ThemeFiles/Js/jquery.js" />
<load href="__TMPL__ThemeFiles/Js/jquery.json.js" />
<!-- 菜单区域  -->
<script type="text/javascript">
CONFIRM_FOREVER_DELETE = "删除竞拍将删除相关的竞拍记录，用户推广设置，请谨慎操作!";
</script>
<!-- 主页面开始 -->
<div id="main" class="main" >

<!-- 主体内容  -->
<div class="content" >
<div class="title">{$Think.lang.DATA_LIST}</div>
<!--  功能操作区域  -->
<form method='get' action="__APP__">
<div class="operate" >
<fanwe:imageBtn name="add" value="{$Think.lang._ADD_DATA}" click="addData()" style="impBtn hMargin fLeft shadow" />
<fanwe:imageBtn name="edit" value="{$Think.lang._EDIT_DATA}" click="editData()" style="impBtn hMargin fLeft shadow" />
<fanwe:imageBtn name="delete" value="{$Think.lang._DELETE_DATA}" click="foreverdel()" style="impBtn hMargin fLeft shadow" />
<!-- 查询区域 -->
<select id="auction_type" name="auction_type">
	<option value="-1">=竞拍类型=</option>
	<option value="0" <if condition="$auction_type eq 0">selected="selected" </if>>广告位</option>
	<option value="1" <if condition="$auction_type eq 1">selected="selected" </if>>团购排序</option>
</select>
<select name="billing_type">
	<option value="-1">=计费类型=</option>
	<option value="0" <if condition="$billing_type eq 0">selected="selected" </if>>点击付费</option>
	<option value="1" <if condition="$billing_type eq 1">selected="selected" </if>>固定费用</option>
</select>
<select name="auction_status">
	<option value="-1">=竞拍状态=</option>
	<option value="0" <if condition="$auction_status eq 0">selected="selected" </if>>进行中</option>
	<option value="1" <if condition="$auction_status eq 1">selected="selected" </if>>未开始</option>
	<option value="2" <if condition="$auction_status eq 2">selected="selected" </if>>已结束</option>
</select>
<select name="validity_status">
	<option value="-1">=有效期=</option>
	<option value="0" <if condition="$validity_status eq 0">selected="selected" </if>>进行中</option>
	<option value="1" <if condition="$validity_status eq 1">selected="selected" </if>>未开始</option>
	<option value="2" <if condition="$validity_status eq 2">selected="selected" </if>>已结束</option>
</select>
<input type="text" name="auction_name" value="{$auction_name}" title="{$Think.lang.ARTICLE_NAME}" class="medium" >
<fanwe:imageBtn type="submit" name="search" value="{$Think.lang._SEARCH_DATA}" style="impBtn hMargin fLeft shadow" />
</div>
<!-- 高级查询区域 -->
<input type="hidden" name="status" value="1" />
<input type="hidden" name="{:c('VAR_MODULE')}" value="Auction" />
<input type="hidden" name="{:c('VAR_ACTION')}" value="index" />
</form>
<!-- 功能操作区域结束 -->
<!-- 列表显示区域  -->
<div class="list" >
<fanwe:list 
	id="checkList" 
	name="auction" 
	style="list" 
	checkbox="true" 
	action="true" 
	datasource="list" 
	isrel="true" 
	child="true" 
	show="id:{$Think.lang.ID}|8%,name:竞拍名称:edit,auction_type|getAuctionType:竞拍类型,base_price|priceFormat:起拍价,billing_type|getBillingType:计费类型,is_hot|getHot:热门|50,begin_time|toDate:开始时间,end_time|toDate:结束时间,sort:{$Think.lang.SORT}" 
	actionlist="edit:{$Think.lang._EDIT_DATA}:id,id|getResetLink=$auction['auction_status'],foreverdel:{$Think.lang._DELETE_DATA}:id" /> 
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<!-- 主页面结束 -->
<script type="text/javascript">
jQuery(function($){
	var statusImages = ["__TMPL__ThemeFiles/Images/locked.gif","__TMPL__ThemeFiles/Images/ok.gif"];
	$("td[rel='is_hot|getHot']").click(function(){
		var thisTD = $(this);							 
		var id = $("input",thisTD.parent()).val();
		
		$.ajax({
			url: APP+"?"+VAR_MODULE+"=Auction&"+VAR_ACTION+"=updateHot&id="+id,
			cache: false,
			success:function(data)
			{
				if(data != "err")
				{
					$("img",thisTD).attr({"src":statusImages[data]});
				}
			}
		});			 
	});
});

function resetHandler()
{
	return confirm("重置将清除竞拍相关的所有数据，请谨慎操作!");
}
</script>

